home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1999 / MacHack 1999.toast / The Hacks / BlueBox Spy / Blue Box Daemon / source / CSimpleUDPServer.h < prev    next >
Encoding:
Text File  |  1998-08-06  |  1.6 KB  |  65 lines  |  [TEXT/CWIE]

  1. // ===========================================================================
  2. //    CSimpleUDPServer.h            ©1995-1998 Metrowerks Inc. All rights reserved.
  3. // ===========================================================================
  4.  
  5. #pragma once
  6.  
  7. #include <LUDPEndpoint.h>
  8.  
  9. #include <LSingleDoc.h>
  10. #include <LCaption.h>
  11.  
  12. #include "CUDPServerThread.h"
  13. #include "CTerminalPane.h"
  14.  
  15. // ===========================================================================
  16. //        • CSimpleUDPServer
  17. // ===========================================================================
  18.  
  19. class CUDPServerThread;
  20.  
  21. class CSimpleUDPServer :    public PP_PowerPlant::LSingleDoc{
  22.  
  23. public:
  24.  
  25.                             CSimpleUDPServer(
  26.                                 LCommander* inSuper);
  27.             
  28.     void                    ListenToMessage(
  29.                                 PP_PowerPlant::MessageT        inMessage,
  30.                                 void *            ioParam);
  31.  
  32.     virtual PP_PowerPlant::LUDPEndpoint*    GetEndPoint() const;
  33.  
  34.     virtual void            WaitForUDPData(
  35.                                 UInt32        inPort);
  36.     
  37.     virtual void            CreateServerWindow(
  38.                                 UInt32        inPort);
  39.  
  40.     virtual void            BindCompleted();
  41.     virtual void            BindFailed();
  42.     
  43.     virtual void            ServerThreadDied();
  44.     
  45.     virtual Boolean            AllowSubRemoval(
  46.                                 LCommander *inSub);
  47.     
  48.     virtual Boolean            AttemptQuitSelf(
  49.                                 SInt32    inSaveOption);
  50.                                 
  51. protected:
  52.  
  53.     virtual                    ~CSimpleUDPServer();
  54.  
  55.     PP_PowerPlant::LUDPEndpoint*    mEndpoint;        // our network endpoint object
  56.  
  57.     CTerminalPane*                    mTerminalPane;
  58.     CUDPServerThread*                mServerThread;    // the thread that actually handles the connection
  59.     
  60.     bool                            mQuitWhenDone;    // re-issue quit request when disconnect complete
  61.     SInt32                            mSaveOption;
  62.  
  63.     friend class CUDPServerThread;
  64. };
  65.